<?php

namespace STAGE\StageBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Commentaire
 *
 * @ORM\Table()
 * @ORM\Entity(repositoryClass="STAGE\StageBundle\Entity\CommentaireRepository")
 */
class Commentaire {

    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var string
     *
     * @ORM\Column(name="commentaire", type="text")
     */
    private $commentaire;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="date_com", type="date")
     */
    private $dateCom;

    /**
     *
     * @ORM\ManyToOne(targetEntity="STAGE\StageBundle\Entity\Document",inversedBy="commentaires")
     */
    private $document;
    /**
     *
     * @ORM\ManyToOne(targetEntity="STAGE\UserBundle\Entity\User",inversedBy="commentaires")
     */
    private $user;

    /**
     * Get id
     *
     * @return integer 
     */
    public function getId() {
        return $this->id;
    }

    /**
     * Set commentaire
     *
     * @param string $commentaire
     * @return Commentaire
     */
    public function setCommentaire($commentaire) {
        $this->commentaire = $commentaire;

        return $this;
    }

    /**
     * Get commentaire
     *
     * @return string 
     */
    public function getCommentaire() {
        return $this->commentaire;
    }

    /**
     * Set dateCom
     *
     * @param \DateTime $dateCom
     * @return Commentaire
     */
    public function setDateCom($dateCom) {
        $this->dateCom = $dateCom;

        return $this;
    }

    /**
     * Get dateCom
     *
     * @return \DateTime 
     */
    public function getDateCom() {
        return $this->dateCom;
    }

    /**
     * Set heureCom
     *
     * @param integer $heureCom
     * @return Commentaire
     */
    public function setHeureCom($heureCom) {
        $this->heureCom = $heureCom;

        return $this;
    }

    /**
     * Get heureCom
     *
     * @return integer 
     */
    public function getHeureCom() {
        return $this->heureCom;
    }


    /**
     * Set document
     *
     * @param \STAGE\StageBundle\Entity\Document $document
     * @return Commentaire
     */
    public function setDocument(\STAGE\StageBundle\Entity\Document $document = null)
    {
        $this->document = $document;

        return $this;
    }

    /**
     * Get document
     *
     * @return \STAGE\StageBundle\Entity\Document 
     */
    public function getDocument()
    {
        return $this->document;
    }

    /**
     * Set user
     *
     * @param \STAGE\UserBundle\Entity\User $user
     * @return Commentaire
     */
    public function setUser(\STAGE\UserBundle\Entity\User $user = null)
    {
        $this->user = $user;

        return $this;
    }

    /**
     * Get user
     *
     * @return \STAGE\UserBundle\Entity\User 
     */
    public function getUser()
    {
        return $this->user;
    }
}
